<template>
  <div>
    <div class="dashboard-editor-container" :style="{backgroundImage: 'url(' + bgImg + ')' }" v-if="perms != 1 && perms !=3">
      <home-index></home-index>
      <footercopy></footercopy>
      <!--<el-button type="primary" round @click="manualDownload"
         icon="el-icon-download" style="position: absolute;top:97.5%;left: 13%">
        下载平台操作手册
      </el-button>-->
    </div>
    <statistical v-else-if="perms==1"></statistical>
    <syslog v-else></syslog>
  </div>
</template>

<script>
// import { info } from '@/api/dashboard'
import {doGet, doPost} from '@/api'
import CountTo from 'vue-count-to'
import bgImg from '../../assets/piao-bg.jpg'
import { mapGetters } from 'vuex'
import HomeIndex from '../company/homeIndex'
import Statistical from '../statistical/statistical'
import Syslog from '../statistical/syslog'
import Footercopy from '../company/footercopy'

export default {
  components: {
    HomeIndex,
    Statistical,
    Syslog,
    Footercopy
  },
  computed: {
    ...mapGetters([
      'permission_routers',
      'sidebar',
      'avatar',
      "name",
      "perms",
      "news",
      'fullName',
      'status'
    ]),
    isCollapse() {
      return !this.sidebar.opened
    }
  },
  data() {
    return {
      bgImg: bgImg,
      date: '',
    }
  },
  created() {
  },
  methods: {
    handleSetLineChartData(type) {
      this.$emit('handleSetLineChartData', type)
    },
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  .dashboard-editor-container {
    padding: 200px 0 0px;
    background-color: #f7f7f7;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;

    .chart-wrapper {
      background: #fff;
      padding: 16px 16px 0;
      margin-bottom: 32px;
    }
  }

  .panel-group {
    margin-top: 18px;

    .card-panel-col {
      margin-bottom: 32px;
    }

    .card-panel {
      height: 108px;
      cursor: pointer;
      font-size: 12px;
      position: relative;
      overflow: hidden;
      color: #666;
      background: #fff;
      box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
      border-color: rgba(0, 0, 0, .05);

      &:hover {
        .card-panel-icon-wrapper {
          color: #fff;
        }

        .icon-people {
          background: #40c9c6;
        }

        .icon-message {
          background: #36a3f7;
        }

        .icon-money {
          background: #f4516c;
        }

        .icon-shoppingCard {
          background: #34bfa3
        }
      }

      .icon-people {
        color: #40c9c6;
      }

      .icon-message {
        color: #36a3f7;
      }

      .icon-money {
        color: #f4516c;
      }

      .icon-shoppingCard {
        color: #34bfa3
      }

      .card-panel-icon-wrapper {
        float: left;
        margin: 14px 0 0 14px;
        padding: 16px;
        transition: all 0.38s ease-out;
        border-radius: 6px;
      }

      .card-panel-icon {
        float: left;
        font-size: 48px;
      }

      .card-panel-description {
        float: right;
        font-weight: bold;
        margin: 26px;
        margin-left: 0px;

        .card-panel-text {
          line-height: 18px;
          color: rgba(0, 0, 0, 0.45);
          font-size: 16px;
          margin-bottom: 12px;
        }

        .card-panel-num {
          font-size: 20px;
        }
      }
    }
  }
</style>
